package xin.marcher.module.rights.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xin.marcher.module.common.core.JsonResult;
import xin.marcher.module.rights.api.LoginApi;
import xin.marcher.module.rights.domain.request.LoginRequest;

/**
 *
 */
@RestController
@RequestMapping("/rights")
public class LoginController {

    @Autowired
    private LoginApi loginApi;

    /**
     * 登录
     */
    @PostMapping("/login")
    public JsonResult login(@RequestBody LoginRequest request) {
        return loginApi.login(request);
    }

}
